Skip to content

c/c++ runner looping buffer#112

Merged
sbSteveK merged 5 commits into
mainfrom
c-looping-buffer
May 12, 2026
Merged

c/c++ runner looping buffer#112
sbSteveK merged 5 commits into
mainfrom
c-looping-buffer

Conversation

@sbSteveK
Copy link
Copy Markdown
Contributor

@sbSteveK sbSteveK commented May 6, 2026

crt-java appears to be benchmarking faster than the crt-c runner. Investigation shows that java is using a 8MiB buffer while native c is setting up one uber buffer the size of the file. Using a singular mega-buffer in crt-c was causing high CPU cache thrashing and accessing DRAM instead of utilizing faster CPU L3 cache.

This PR mirrors what Java is doing into the native C runner by setting up a fixed 8MiB buffer instead of a buffer sized to the largest upload file.

crt-c runner upload-max-throughput results:

With full file size buffer:
Gb/s mean: 147.25
Duration: 29.17

With 8MiB looping buffer:
Gb/s mean: 153.48
Duration: 27.99

crt-cpp runner was also updated as well.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment thread runners/s3-benchrunner-c/BenchmarkRunner.cpp Outdated
Comment thread runners/s3-benchrunner-c/CRunner.cpp
@sbSteveK sbSteveK changed the title c runner looping buffer c/c++ runner looping buffer May 7, 2026
@sbSteveK sbSteveK merged commit f3e33bb into main May 12, 2026
8 checks passed
@sbSteveK sbSteveK deleted the c-looping-buffer branch May 12, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants